const express = require("express");
const router = express.Router();
const pool = require("../../../src/pg/config/pg");
//更新数据
router.get("/edit/:id", async (req, res) => {
    await pool.query(
      "update chat set  name = $1 where id = 14 ;",
      [req.params.id],
      (err, data) => {
        if (err) {
          res.status(200).json({ id: "1", name: "删除数据失败" });
          pool.end;
        } else {
          res.status(200).json({ id: "1", name: "删除数据成功" });
          pool.end;
        }
      }
    );
  });
module.exports = router